package com.fucius.study.crawler.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

import javax.annotation.Resource;
import java.time.LocalDateTime;

//@Configuration
//@EnableScheduling
//@Slf4j
public class ScheduleConfig {

    @Resource
    private com.fucius.study.crawler.service.CrawlerService CrawlerService;

//    @Scheduled(cron = "0 0 7,13,19 * * *")
    public void scheduled1(){
//        log.info("定时任务start"+ LocalDateTime.now().toString());
        CrawlerService.service1();
//        log.info("定时任务end"+ LocalDateTime.now().toString());
    }
}
